﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SysKeyValue.aspx.cs" Inherits="SysKeyValue" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link href="Base/Template/assets/css/bootstrap.min.css" rel="stylesheet" />
    <script src="Base/Template/assets/js/jquery-1.10.2.min.js"></script>
    <style>
        .table {
         margin:0
        }
        form {
        margin:0;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowDeleting="GridView1_RowDeleting" OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating" CssClass="table-condensed table table-bordered" DataKeyNames="id">
            <Columns>
                <asp:BoundField DataField="KeyValue" ControlStyle-CssClass="input-small" HeaderText="值" >
<ControlStyle CssClass="input-small"></ControlStyle>
                </asp:BoundField>
                <asp:BoundField DataField="KeyDisplay" ControlStyle-CssClass="input-small" HeaderText="显示" >
<ControlStyle CssClass="input-small"></ControlStyle>
                </asp:BoundField>
                <asp:CommandField ShowEditButton="True" >
                <HeaderStyle Width="100px" />
                <ItemStyle Width="100px" />
                </asp:CommandField>
                <asp:CommandField ShowDeleteButton="True" >
                <HeaderStyle Width="50px" />
                <ItemStyle Width="50px" />
                </asp:CommandField>
            </Columns>
        </asp:GridView>
        <table class="table-condensed table table-bordered">
            <tr>
                <td>
                    <asp:TextBox ID="txt_Value" runat="server" placeholder="键值"></asp:TextBox></td>
                <td>
                    <asp:TextBox ID="txt_Display" runat="server" placeholder="显示"></asp:TextBox></td>
                <td>
                    <asp:Button ID="btn_Add" runat="server" CssClass="btn" Text="新增" OnClick="btn_Add_Click" /></td>
                
            </tr>
        </table>
    </div>
    </form>
    <script>
        $(document).ready(function () {
            ResizeParent();
        });
        function ResizeParent() {
            try {
                var h = $(document.body).height();
                //alert(h);
                if (h < 205) {
                    h = 205;
                }
                h += 10;
                window.parent.document.getElementById("SysValue").style.height = (h + 36) + "px";
            }
            catch (err) {
            }
        }

    </script>
</body>
</html>
